//
//  NewsTableViewCell.m
//  UI10-CellSelfSize
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "UIView+Frame.h"
@interface NewsTableViewCell ()
@property (nonatomic,strong) UILabel *newsLabel;
@end

@implementation NewsTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _newsLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _newsLabel.numberOfLines = 0;
        
        [self.contentView addSubview:_newsLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
     NSLog(@"%f",self.contentView.sy_height);
     NSLog(@"%f",self.sy_height);
//         NSLog(@"%f",self.sy_height);
    _newsLabel.frame = CGRectMake(0, 0, self.contentView.sy_width, self.sy_height);
    
    
}

- (void)setString:(NSString *)string
{
    _string = [string copy];
    _newsLabel.text = _string;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
